package edu.cs.usask.ca.silver.plugin.rcp.perspectives;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.ui.console.IConsoleConstants;

import edu.cs.usask.ca.silver.plugin.rcp.views.ConsoleType;
import edu.cs.usask.ca.silver.plugin.rcp.views.SilverMessageConsole;

public class ConsolePerspective implements IPerspectiveFactory {

	public static final String ID = "edu.cs.usask.ca.silver.plugin.rcp.perspectives.console";

	@Override
	public void createInitialLayout(IPageLayout layout) {

		layout.setEditorAreaVisible(false);

		IFolderLayout consoleFolder = layout.createFolder("console",
				IPageLayout.BOTTOM, 0.65f, "messages");
		consoleFolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
		SilverMessageConsole.findConsole(ConsoleType.SILVER).messageConsoleByLine(
				"Console Initialized");

	}

}
